<?php
//包含数据库配置文件
include '../../public/dbconfig.php';
//包含函数库文件
include '../../public/func.inc.php';
$link = conn();

//接收信息 更新到版块表中
$cname = $_POST['cname'];
$cid = $_POST['cid'];
//var_dump($cname);
//var_dump($cid);
//exit;
$sql = "update bbs_cate set cname='{$cname}' where id={$cid}";

if(mysqli_query($link, $sql)){
	echo '<script>alert("版块修改成功");window.location.href="list.php";</script>';
}else{
	echo '<script>alert("版块修改失败");window.location.href="list.php";</script>';
}
mysqli_close($link);